﻿@model SDSystem.Models.Forum
@using Ext.Net.MVC;
@using Ext.Net;
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section ToolbarSection{
    @(Html.X().ButtonGroup().Items(
        Html.X().Button().Text("Save").Icon(Icon.Disk).DirectEvents(
        de=>
            {
                de.Click.Url = Url.Action("EditCommit");
                de.Click.EventMask.ShowMask = true;
                de.Click.FormID = "EditForumView";
            }),
        Html.X().Button().Text("Back").Icon(Icon.PreviousGreen)
        ))
}




@(Html.X().FormPanel()
      .ID("EditForumView")
      .BodyPadding(5)
      .Items(
          Html.X().FieldSet().Title("Form Details").Layout(LayoutType.Form).Padding(5).Items(
              Html.X().HiddenFor(m=>m.ForumId),
              Html.X().ComboBoxFor(m=>m.CateId).FieldLabel("Category").ID("listCate").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top).SelectedItems(ViewBag.Cate).Items(ViewBag.CateList),
              Html.X().ComboBoxFor(m=>m.TypeId).FieldLabel("Forum Type").ID("listType").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top).SelectedItems(ViewBag.Type).Items(ViewBag.TypeList),
              Html.X().TextFieldFor(m=>m.ForumName).FieldLabel("Forum Name").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().HtmlEditorFor(m => m.Description).ID("ckeContent1").FieldLabel("Description").Height(150).LabelWidth(100).LabelAlign(LabelAlign.Top),
              Html.X().TextFieldFor(m=>m.TotalTopics).FieldLabel("Total Topics").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().TextFieldFor(m => m.TotalMembers).FieldLabel("Total Members").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().DateFieldFor(m=>m.DateCreate).FieldLabel("Date Create").LabelWidth(100).Width(300).LabelAlign(LabelAlign.Top),
              Html.X().CheckboxFor(m=>m.IsActive).ID("forumActive").FieldLabel("Is Active?").LabelWidth(100).LabelAlign(LabelAlign.Top))))
@*@Html.TextArea("ckeContent")
<script src="../../ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
    var editor = CKEDITOR.replace("ckeContent");
    //CKFinder.setupCKEditor(editor, '/Scripts/ckfinder/');
</script>*@
